@extends('layouts.main')

@section('title', '显示外部订单')

@section('content')
<h3>@yield('title')</h3>
<div class="btn-group" role="group">
  <a href="{{ action('BusinessData\ExternalOrderDetailsController@index') }}" class="btn btn-primary">返回列表</a>
</div>

<form class="form-horizontal">

	<div class="form-group">
		<label for="year" class="col-sm-2 control-label">年份</label>
		<div class="col-sm-3">
			<input class="form-control" id="year" name="year" value="{{ $model->year }}" disabled>
		</div>
    </div>

	<div class="form-group">
		<label for="payer_code" class="col-sm-2 control-label">客户代码</label>
		<div class="col-sm-3">
			<input class="form-control" id="payer_code" name="payer_code" value="{{ $model->payer_code.'---'.$model->payer->name }}" disabled>
		</div>
    </div>

    <div class="form-group">
		<label for="material_code" class="col-sm-2 control-label">物料编码</label>
		<div class="col-sm-3">
			<input class="form-control" id="material_code" name="material_code" value="{{ $model->material_code }}" disabled>
		</div>
    </div>

	<div class="form-group">
		<label for="category_contract_id" class="col-sm-2 control-label">品类</label>
		<div class="col-sm-3">
			<select class="form-control" id="category_contract_id" name="category_contract_id" disabled>
				<option value="{{ $model->category_contract_id }}">{{ $model->category_contract->name }}</option>
			</select>
		</div>
    </div>

	<div class="form-group">
		<label for="quantity" class="col-sm-2 control-label">数量</label>
		<div class="col-sm-3">
		  <input class="form-control" id="quantity" name="quantity"  value="{{ $model->quantity }}" disabled>
		</div>
	</div>

	<div class="form-group">
		<label for="amount" class="col-sm-2 control-label">金额</label>
		<div class="col-sm-3">
		  <input class="form-control" id="amount" name="amount" value="{{ $model->amount }}" disabled>
		</div>
	</div>

    <div class="form-group">
		<div class="col-sm-offset-2 col-sm-10">
			<a href="{{ action('BusinessData\ExternalOrderDetailsController@edit', $model) }}" class="btn btn-primary">编辑</a>
			<a href="{{ action('BusinessData\ExternalOrderDetailsController@create') }}" class="btn btn-primary">继续添加</a>
		</div>
    </div>
</form>

@endsection